package cn.wizzer.app.user.modules.models.enums;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public enum MsgStatusEnum {
    UN_READ("未读",0),
    READ("已读",1),
    DELETED("已删除",-1),
    WITHDREW("已撤回",-2),
    ;
    public final String STATUS;
    public final int VAL;

    MsgStatusEnum(String STATUS,int VAL) {
        this.STATUS = STATUS;
        this.VAL = VAL;
    }

    public String getSTATUS() {
        return STATUS;
    }

    public static List toList() {
        List<Map<String, Object>> list = new ArrayList<>();
        for (MsgStatusEnum msgStatusEnum : MsgStatusEnum.values()) {
            Map<String, Object> map = new HashMap<>();
            map.put("name", msgStatusEnum.getSTATUS());
            map.put("val", msgStatusEnum);
            list.add(map);
        }
        return list;
    }
}
